package com.demo.studentmanager.dto;

import com.demo.studentmanager.entity.Score;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

/**
 * @author LinQiSen
 */
@Data
@Accessors(chain = true)
public class ScoreAddDto extends BaseDto<Score> {

    @ApiModelProperty(value = "学生学号", required = true)
    @NotNull(message = "不能为空")
    private String sno;

    @ApiModelProperty(value = "课程号", required = true)
    @NotNull(message = "不能为空")
    private String cno;

    @ApiModelProperty(value = "成绩")
    @Max(value = 100)
    private Double degree;


}
